Home:ALL Converter>matlab error when connecting to postgresql database

matlab error when connecting to postgresql database

Ask Time:2019-11-01T20:05:30         Author:Jepessen

Json Formatter

I'm trying to connec to a PostgreSQL database with following command:

connection = database( ...
        options.getDatabaseName(), ...
        options.getUsername(), ...
        options.getPassword(), ...
        "org.postgresql.Driver", ...
        "jdbc:postgresql://" + options.getHostname() + ":" + options.getPort() + "/" + options.getDatabaseName() ...
        );

It returns me following error:

Error using database (line 59)
Unmatched parameter name 'org.postgresql.Driver' must be a string scalar or character vector that can represent a field name.

I've seen other questions about that, like this one but the error message is different.

What I'm doing wrong?

Author:Jepessen,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58658971/matlab-error-when-connecting-to-postgresql-database
yy